package model

import (
	"time"
)

type User struct {
	// gorm.Model
	ID        uint      `gorm:"primaryKey"`
	Username  string    `gorm:"unique;notNull;size:32;comment:用户名"`
	Password  string    `gorm:"notNull;size:64;comment:密码"`
	Nickname  string    `gorm:"notNull;size:32;default:用户;comment:昵称"`
	Avatar    string    `gorm:"type:varchar(255);default:'/static/avatar/default.png';comment:头像"`
	Email     string    `gorm:"unique;notNull;type:varchar(100);comment:邮箱"`
	Sex       string    `gorm:"type:enum('男','女');default:男;comment:性别"`
	Active    bool      `gorm:"notNull;default:true;comment:是否激活"`
	CreatedAt time.Time `gorm:"autoCreateTime;comment:创建时间"`
	UpdatedAt time.Time `gorm:"autoUpdateTime;comment:更新时间"`
	DeletedAt time.Time `gorm:"autoDeleteTime;comment:删除时间"`
}
